package com.anrongtec.zcpt.constant;

import com.google.gson.annotations.Expose;

import java.io.Serializable;

/**
 * 作者：liuhui on 2017/2/12 23:06
 * 邮箱：liu594545591@126.com
 * 描述：JsonDataRestult
 */

public class JsonDataRestult<T> implements Serializable {
    public static final String SCCUESS="0000";
    /**返回码*/
    @Expose
    private String retCode = "";
    /**返回信息*/
    @Expose
    private String retMsg = "";
    /**具体业务数据*/
    @Expose
    private T data;

    public String getRetCode() {
        return retCode;
    }
    public void setRetCode(String retCode) {
        this.retCode = retCode;
    }
    public String getRetMsg() {
        return retMsg;
    }
    public void setRetMsg(String retMsg) {
        this.retMsg = retMsg;
    }
    public T getData() {
        return data;
    }
    public void setData(T data) {
        this.data = data;
    }

//    /**
//     * 解析User
//     * @param json
//     * @return
//     */
//    public static JsonDataRestult<User> decodeUser(String json){
//        Gson gson = new Gson();
//        Type jsonType = new TypeToken<JsonDataRestult<User>>() {
//        }.getType();
//        return gson.fromJson(json, jsonType);
//    }
}
